#define _CRT_SECURE_NO_WARNINGS 1
#include<stdio.h>
#define MAX 10

void Merge(int* const arr,int * const arrt, int left, int mid, int right)
{
	int i = left;
	int j = left;
	int k = mid+1;
	while (j<=mid && k<=right)
	{
		if (arrt[j] < arrt[k])
		{
			arr[i++] = arrt[j++];
		}
		else
		{
			arr[i++] = arrt[k++];
		}
	}
	while (j <= mid)
	{
		arr[i++] = arrt[j++];
	}
	while (k <= right)
	{
		arr[i++] = arrt[k++];
	}
	i = left;
	while (i <= right)
	{
		arrt[i] = arr[i++];
	}
}

void MSort(int* const arr, int* const arrt, int left, int right)
{
	if (right > left)
	{
		int mid = left + (right - left) / 2;
		MSort(arr, arrt, left, mid);
		MSort(arr, arrt, mid+1, right);
		Merge(arr, arrt, left, mid, right);
	}
}

void MergeSort(int* const arr)
{
	int arrt[MAX] = { 0 };
	int i = 0;
	while (i < MAX)
	{
		arrt[i] = arr[i++];
	}
	MSort(arr, arrt, 0, MAX-1);
}

int main()//1 4 5 6 7 2 3 8 1 11
{
	int arr[MAX] = { 0 };
	int i = 0;
	for (i = 0; i < MAX; i++)
	{
		scanf("%d", &arr[i]);
	}

	MergeSort(arr);

	for (i = 0; i < MAX; i++)
	{
		printf("%d ", arr[i]);
	}

	return 0;
}